<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.hzb.erp.api.pc.lesson.mapper.SubjectMapper">

    <select id="getList" resultType="com.hzb.erp.api.pc.lesson.pojo.SubjectVO">
        SELECT t1.*
        FROM subject t1
        <where>
            <if test="param.name != null and param.name != ''">
                AND t1.name like concat('%', #{param.name}, '%')
            </if>
            AND t1.deleted != 1
        </where>
        order by sort_num desc, t1.id desc
    </select>

</mapper>
